<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML >
<html>
<head>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<title>index</title>
<link rel="stylesheet" href="/common/layui/css/layui.css" />
<script type="text/javascript" src="/common/layui/layui.js"></script>
</head>
<body>
	 
<table class="layui-hide" id="categoryInfo"></table>
              
<script>
layui.use('table', function(){
  var table = layui.table;
  
  table.render({
    elem: '#categoryInfo'
    ,url:'/category/list'
    ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
      layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
      //,curr: 5 //设定初始在第 5 页
      ,groups: 1 //只显示 1 个连续页码
      ,first: false //不显示首页
      ,last: false //不显示尾页
      
    }
    ,cols: [[
      {field:'categoryId', width:80, title: 'ID', sort: true}
      ,{field:'categoryName', width:100, title: '类目名称'}
      ,{field:'categoryType', width:80, title: '类目编号', sort: true}
      ,{field:'createTime', width:80, title: '创建时间'}
      ,{field:'upadteTime', title: '修改时间', minWidth: 150}
    ]]
    
  });
});
</script>
	
	
</body>
</html>